<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Create New Account</title>
</head>
<body>
<table>
<tr><th>If you already have an account,</th> <td><a href=Login.jsp>sign in here.</a></td></tr>
</table>
<form name="newAccountForm" action="createAccount" method="POST">
<jsp:useBean id="newAccountFormHandler" class="com.ochnas.volunteersignup.ui.NewAccountFormHandler" scope="session" />
<jsp:setProperty name="newAccountFormHandler" property="*"/>
<table>
<tr><th colspan="2">All information are required.</th></tr>
<tr>
	<td>Your current email address:</td>
	<td>
		<input type="text" name="emailAddress" value='<%=newAccountFormHandler.getEmailAddress() %>'>
		<br><font size=2 color=red><%=newAccountFormHandler.getErrorMsg("emailAddress") %> </font>
	</td>
</tr>
<tr>
	<td>Choose password:</td>
	<td>
		<input type="password" name="password1" value='<%=newAccountFormHandler.getPassword1() %>'>
		<br><font size=2 color=red><%=newAccountFormHandler.getErrorMsg("password1") %> </font>
	</td>
</tr>
<tr>
	<td>Re-enter password:</td>
	<td>
		<input type="password" name="password2" value='<%=newAccountFormHandler.getPassword2() %>'>
		<br><font size=2 color=red><%=newAccountFormHandler.getErrorMsg("password2") %> </font>
	</td>
</tr>
<tr>
	<td>First name:</td>
	<td>
		<input type="text" name="firstName" value='<%=newAccountFormHandler.getFirstName() %>'>
		<br><font size=2 color=red><%=newAccountFormHandler.getErrorMsg("firstName") %> </font>
	</td>
</tr>
<tr>
	<td>Last name:</td>
	<td>
		<input type="text" name="lastName" value='<%=newAccountFormHandler.getLastName() %>'>
		<br><font size=2 color=red><%=newAccountFormHandler.getErrorMsg("lastName") %> </font>
	</td>
</tr>
<tr>
	<td>Phone number:</td>
	<td>
		<table>
			<tr>
				<td colspan="5"> (Area code) - ### - ####</td>
			</tr>
			<tr>
				<td>( <input type="text" name="areaCode" value='<%=newAccountFormHandler.getAreaCode() %>' size="3" maxlength="3" > )</td>
				<td>-</td>
				<td><input type="text" name="digits1" value='<%=newAccountFormHandler.getDigits1() %>' size="3" maxlength="3"></td>
				<td>-</td>
				<td><input type="text" name="digits2" value='<%=newAccountFormHandler.getDigits2() %>' size="4" maxlength="4"></td>
			</tr>
		</table>
		<br><font size=2 color=red><%=newAccountFormHandler.getErrorMsg("phoneNumber") %> </font>
	</td>
</tr>
<tr>
	<td></td>
	<td>
		<table>
			<tr>
			<td><input type="submit" value="Save" name="button"/></td>
			<td><input type="submit" value="Cancel" name="button"/></td>
			</tr>
		</table>
	</td>
</tr>
</table>
</form>
</body>
</html>